package com.zhdl.network.electricityMeter;

import lombok.Data;

@Data
public class PackBuild {
    public PackBuild(String toAddress, String ASDUData) {
        this.toAddress = toAddress;
        this.ASDUData = ASDUData;
    }

    private String toAddress;
    private String formAddress = "5400";
    private String  appId = "0001";
    private String length = "1000";
    private String APDUTag = "60";
    private String APDUNum = "01";
    private String returnCode = "02";
    private String ASDUTag = "A2";
    private String ASDUStart = "30";
    private String ASDUReserve = "00";
    private String ASDULength = "0800";
    private String ASDUData;
    public String getCMD(){
        return toAddress+formAddress+appId+length+APDUTag+APDUNum+returnCode+ASDUTag+ASDUStart+ASDUReserve+ASDULength+toAddress+ASDUData;
    }
}
